﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tedds_Tool.Instructions;
using CommonInterfaces.Models;
using GUI.Custom_Classes;
using StandardScriptItems.SimpleControls;
using LEET.CommonInterfaces.Models;
using LEET.LEETCommon.Model;
using LEET.StandardModuals.Instructions;
using System.Windows;

namespace Tedds_Tool.Automatables.LEETModuals
{
    public class CommentModual : ILEETModual
    {
        public bool CanCompile(string instruction)
        {
            try
            {
                String[] parts = Instruction.ParseInstruction(instruction);
                return TypeName.Equals(parts[0]);
            }
            catch (InvalidInstructionException)
            {
                return false;
            }
        }

        public IInstruction CreateInstruction(string instruction)
        {
            return new Comment(Instruction.ParseInstruction(instruction));
        }


        public string TypeName
        {
            get { return "COMMENT"; }
        }


        public FrameworkElement CreateScriptItemDetails(LEET.CommonInterfaces.Nil onUpdate, IEnumerable<string> processes, IElementState state)
        {
            return new LEETTextBox("--Comment--");
        }
    }
}
